package com.whatever.lottery.sfc;

public enum Select {
	SFC3,
	SFC1,
	SFC0,
	SFC9;
	
	public static Select fromValue(char c) throws Exception {
		switch (c) {
		case '3':
			return SFC3;
		case '1':
			return SFC1;
		case '0':
			return SFC0;
		case '#':
			return SFC9;
		default:
			throw new Exception("select error");
		}
	}
	
	public char toChar(){
		switch (this) {
		case SFC3:
			return '3';
		case SFC1:
			return '1';
		case SFC0:
			return '0';
		default:
			return '#';
		}
		
	}
}
